#ifndef     __UPDOWN_MOTOR_H
#define     __UPDOWN_MOTOR_H

#include "../utils/object.h"
#include "../utils/nocopyable.h"
#include "../utils/error.h"

namespace pearl_driver {

class UpdownMotor : public Object<UpdownMotor>, private NoCopyable {

public:

    void init();

    bool is_alm() const;

    Error run_with_mm(uint32_t mm) {
        return run( 400 * mm / 4 );
    }

private:
    Error run(uint32_t position);
};

extern UpdownMotor updownMotor;

}


#endif
